import sys
import matplotlib
sys.setrecursionlimit(5000)
from distutils.core import setup
import py2exe
from glob import glob

data_files = [("Microsoft.VC90.CRT", glob(r'C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\redist\\amd64\\Microsoft.VC90.CRT\\*.*'))]
sys.path.append("C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\redist\\amd64\\Microsoft.VC90.CRT")
includes = ['scikits', 'fastdtw', 'numpy']
excludes = ['_gtkagg', '_tkagg', 'bsddb', 'curses', 'pywin.debugger',
            'pywin.debugger.dbgcon', 'pywin.dialogs', 'tcl',
            'Tkconstants', 'Tkinter', 'pydoc', 'doctest', 'test', 'sqlite3'
            ]
dll_excludes = ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll', 'tcl84.dll',
                'tk84.dll']
data_files = data_files + matplotlib.get_py2exe_datafiles()
options = {
'py2exe': {'compressed':1,
'optimize':2,
'includes': includes,
'dll_excludes': dll_excludes,
'excludes': excludes,
'bundle_files':3}
};
setup(data_files=data_files, console=['calc.py'], options=options)